\(\int \frac {A+B \log (\frac {e (a+b x)}{c+d x})}{(f+g x)^4} \, dx\) [238]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [B] (verified)
   Fricas [F(-1)]
   Sympy [F(-1)]
   Maxima [B] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 27, antiderivative size = 275 \[ \int \frac {A+B \log \left (\frac {e (a+b x)}{c+d x}\right )}{(f+g x)^4} \, dx=-\frac {B (b c-a d)}{6 (b f-a g) (d f-c g) (f+g x)^2}-\frac {B (b c-a d) (2 b d f-b c g-a d g)}{3 (b f-a g)^2 (d f-c g)^2 (f+g x)}+\frac {b^3 B \log (a+b x)}{3 g (b f-a g)^3}-\frac {A+B \log \left (\frac {e (a+b x)}{c+d x}\right )}{3 g (f+g x)^3}-\frac {B d^3 \log (c+d x)}{3 g (d f-c g)^3}+\frac {B (b c-a d) \left (a^2 d^2 g^2-a b d g (3 d f-c g)+b^2 \left (3 d^2 f^2-3 c d f g+c^2 g^2\right )\right ) \log (f+g x)}{3 (b f-a g)^3 (d f-c g)^3} \]

[Out]

-1/6*B*(-a*d+b*c)/(-a*g+b*f)/(-c*g+d*f)/(g*x+f)^2-1/3*B*(-a*d+b*c)*(-a*d*g-b*c*g+2*b*d*f)/(-a*g+b*f)^2/(-c*g+d
*f)^2/(g*x+f)+1/3*b^3*B*ln(b*x+a)/g/(-a*g+b*f)^3+1/3*(-A-B*ln(e*(b*x+a)/(d*x+c)))/g/(g*x+f)^3-1/3*B*d^3*ln(d*x
+c)/g/(-c*g+d*f)^3+1/3*B*(-a*d+b*c)*(a^2*d^2*g^2-a*b*d*g*(-c*g+3*d*f)+b^2*(c^2*g^2-3*c*d*f*g+3*d^2*f^2))*ln(g*
x+f)/(-a*g+b*f)^3/(-c*g+d*f)^3

Rubi [A] (verified)

Time = 0.21 (sec) , antiderivative size = 275, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.074, Rules used = {2548, 84} \[ \int \frac {A+B \log \left (\frac {e (a+b x)}{c+d x}\right )}{(f+g x)^4} \, dx=\frac {B (b c-a d) \log (f+g x) \left (a^2 d^2 g^2-a b d g (3 d f-c g)+b^2 \left (c^2 g^2-3 c d f g+3 d^2 f^2\right )\right )}{3 (b f-a g)^3 (d f-c g)^3}-\frac {B \log \left (\frac {e (a+b x)}{c+d x}\right )+A}{3 g (f+g x)^3}+\frac {b^3 B \log (a+b x)}{3 g (b f-a g)^3}-\frac {B (b c-a d) (-a d g-b c g+2 b d f)}{3 (f+g x) (b f-a g)^2 (d f-c g)^2}-\frac {B (b c-a d)}{6 (f+g x)^2 (b f-a g) (d f-c g)}-\frac {B d^3 \log (c+d x)}{3 g (d f-c g)^3} \]

[In]

Int[(A + B*Log[(e*(a + b*x))/(c + d*x)])/(f + g*x)^4,x]

[Out]

-1/6*(B*(b*c - a*d))/((b*f - a*g)*(d*f - c*g)*(f + g*x)^2) - (B*(b*c - a*d)*(2*b*d*f - b*c*g - a*d*g))/(3*(b*f
 - a*g)^2*(d*f - c*g)^2*(f + g*x)) + (b^3*B*Log[a + b*x])/(3*g*(b*f - a*g)^3) - (A + B*Log[(e*(a + b*x))/(c +
d*x)])/(3*g*(f + g*x)^3) - (B*d^3*Log[c + d*x])/(3*g*(d*f - c*g)^3) + (B*(b*c - a*d)*(a^2*d^2*g^2 - a*b*d*g*(3
*d*f - c*g) + b^2*(3*d^2*f^2 - 3*c*d*f*g + c^2*g^2))*Log[f + g*x])/(3*(b*f - a*g)^3*(d*f - c*g)^3)

Rule 84

Int[((e_.) + (f_.)*(x_))^(p_.)/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Int[ExpandIntegrand[(
e + f*x)^p/((a + b*x)*(c + d*x)), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && IntegerQ[p]

Rule 2548

Int[((A_.) + Log[(e_.)*((a_.) + (b_.)*(x_))^(n_.)*((c_.) + (d_.)*(x_))^(mn_)]*(B_.))*((f_.) + (g_.)*(x_))^(m_.
), x_Symbol] :> Simp[(f + g*x)^(m + 1)*((A + B*Log[e*((a + b*x)^n/(c + d*x)^n)])/(g*(m + 1))), x] - Dist[B*n*(
(b*c - a*d)/(g*(m + 1))), Int[(f + g*x)^(m + 1)/((a + b*x)*(c + d*x)), x], x] /; FreeQ[{a, b, c, d, e, f, g, A
, B, m, n}, x] && EqQ[n + mn, 0] && NeQ[b*c - a*d, 0] && NeQ[m, -1] &&  !(EqQ[m, -2] && IntegerQ[n])

Rubi steps \begin{align*} \text {integral}& = -\frac {A+B \log \left (\frac {e (a+b x)}{c+d x}\right )}{3 g (f+g x)^3}+\frac {(B (b c-a d)) \int \frac {1}{(a+b x) (c+d x) (f+g x)^3} \, dx}{3 g} \\ & = -\frac {A+B \log \left (\frac {e (a+b x)}{c+d x}\right )}{3 g (f+g x)^3}+\frac {(B (b c-a d)) \int \left (\frac {b^4}{(b c-a d) (b f-a g)^3 (a+b x)}+\frac {d^4}{(b c-a d) (-d f+c g)^3 (c+d x)}+\frac {g^2}{(b f-a g) (d f-c g) (f+g x)^3}-\frac {g^2 (-2 b d f+b c g+a d g)}{(b f-a g)^2 (d f-c g)^2 (f+g x)^2}+\frac {g^2 \left (a^2 d^2 g^2-a b d g (3 d f-c g)+b^2 \left (3 d^2 f^2-3 c d f g+c^2 g^2\right )\right )}{(b f-a g)^3 (d f-c g)^3 (f+g x)}\right ) \, dx}{3 g} \\ & = -\frac {B (b c-a d)}{6 (b f-a g) (d f-c g) (f+g x)^2}-\frac {B (b c-a d) (2 b d f-b c g-a d g)}{3 (b f-a g)^2 (d f-c g)^2 (f+g x)}+\frac {b^3 B \log (a+b x)}{3 g (b f-a g)^3}-\frac {A+B \log \left (\frac {e (a+b x)}{c+d x}\right )}{3 g (f+g x)^3}-\frac {B d^3 \log (c+d x)}{3 g (d f-c g)^3}+\frac {B (b c-a d) \left (a^2 d^2 g^2-a b d g (3 d f-c g)+b^2 \left (3 d^2 f^2-3 c d f g+c^2 g^2\right )\right ) \log (f+g x)}{3 (b f-a g)^3 (d f-c g)^3} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.39 (sec) , antiderivative size = 260, normalized size of antiderivative = 0.95 \[ \int \frac {A+B \log \left (\frac {e (a+b x)}{c+d x}\right )}{(f+g x)^4} \, dx=\frac {-\frac {A+B \log \left (\frac {e (a+b x)}{c+d x}\right )}{(f+g x)^3}+B (b c-a d) \left (-\frac {g}{2 (b f-a g) (d f-c g) (f+g x)^2}+\frac {g (-2 b d f+b c g+a d g)}{(b f-a g)^2 (d f-c g)^2 (f+g x)}+\frac {b^3 \log (a+b x)}{(b c-a d) (b f-a g)^3}+\frac {d^3 \log (c+d x)}{(b c-a d) (-d f+c g)^3}+\frac {g \left (a^2 d^2 g^2+a b d g (-3 d f+c g)+b^2 \left (3 d^2 f^2-3 c d f g+c^2 g^2\right )\right ) \log (f+g x)}{(b f-a g)^3 (d f-c g)^3}\right )}{3 g} \]

[In]

Integrate[(A + B*Log[(e*(a + b*x))/(c + d*x)])/(f + g*x)^4,x]

[Out]

(-((A + B*Log[(e*(a + b*x))/(c + d*x)])/(f + g*x)^3) + B*(b*c - a*d)*(-1/2*g/((b*f - a*g)*(d*f - c*g)*(f + g*x
)^2) + (g*(-2*b*d*f + b*c*g + a*d*g))/((b*f - a*g)^2*(d*f - c*g)^2*(f + g*x)) + (b^3*Log[a + b*x])/((b*c - a*d
)*(b*f - a*g)^3) + (d^3*Log[c + d*x])/((b*c - a*d)*(-(d*f) + c*g)^3) + (g*(a^2*d^2*g^2 + a*b*d*g*(-3*d*f + c*g
) + b^2*(3*d^2*f^2 - 3*c*d*f*g + c^2*g^2))*Log[f + g*x])/((b*f - a*g)^3*(d*f - c*g)^3)))/(3*g)

Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(1503\) vs. \(2(266)=532\).

Time = 3.05 (sec) , antiderivative size = 1504, normalized size of antiderivative = 5.47

method result size
parts \(\text {Expression too large to display}\) \(1504\)
derivativedivides \(\text {Expression too large to display}\) \(1821\)
default \(\text {Expression too large to display}\) \(1821\)
risch \(\text {Expression too large to display}\) \(2293\)
parallelrisch \(\text {Expression too large to display}\) \(2896\)

[In]

int((A+B*ln(e*(b*x+a)/(d*x+c)))/(g*x+f)^4,x,method=_RETURNVERBOSE)

[Out]

-1/3*A/(g*x+f)^3/g-B/d^2*(a*d-b*c)*e*(2*d^3*e*g*(a*d-b*c)/(c*g-d*f)^2*(-1/2/(a*g-b*f)^2/e^2*(1/(c*g-d*f)*ln(c*
g*(b*e/d+(a*d-b*c)*e/d/(d*x+c))-d*f*(b*e/d+(a*d-b*c)*e/d/(d*x+c))-a*e*g+b*e*f)+e*(a*g-b*f)/(c*g-d*f)/(c*g*(b*e
/d+(a*d-b*c)*e/d/(d*x+c))-d*f*(b*e/d+(a*d-b*c)*e/d/(d*x+c))-a*e*g+b*e*f))+1/2*ln(b*e/d+(a*d-b*c)*e/d/(d*x+c))*
(c*g*(b*e/d+(a*d-b*c)*e/d/(d*x+c))-d*f*(b*e/d+(a*d-b*c)*e/d/(d*x+c))-2*a*e*g+2*b*e*f)*(b*e/d+(a*d-b*c)*e/d/(d*
x+c))/(c*g*(b*e/d+(a*d-b*c)*e/d/(d*x+c))-d*f*(b*e/d+(a*d-b*c)*e/d/(d*x+c))-a*e*g+b*e*f)^2/(a*g-b*f)^2/e^2)+d^2
*e^2*(a^2*d^2-2*a*b*c*d+b^2*c^2)*g^2/(c*g-d*f)^2*(-1/3/(a*g-b*f)/(a^2*g^2-2*a*b*f*g+b^2*f^2)/e^3*(1/2*e^2*(a^2
*g^2-2*a*b*f*g+b^2*f^2)/(c*g-d*f)/(c*g*(b*e/d+(a*d-b*c)*e/d/(d*x+c))-d*f*(b*e/d+(a*d-b*c)*e/d/(d*x+c))-a*e*g+b
*e*f)^2-1/(c*g-d*f)*ln(c*g*(b*e/d+(a*d-b*c)*e/d/(d*x+c))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+a)/(d*x+c)))/(g*x+f)^4,x, algorithm="fricas")

[Out]

Timed out

Sympy [F(-1)]

Timed out. \[ \int \frac {A+B \log \left (\frac {e (a+b x)}{c+d x}\right )}{(f+g x)^4} \, dx=\text {Timed out} \]

[In]

integrate((A+B*ln(e*(b*x+a)/(d*x+c)))/(g*x+f)**4,x)

[Out]

Timed out

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 848 vs. \(2 (263) = 526\).

Time = 0.26 (sec) , antiderivative size = 848, normalized size of antiderivative = 3.08 \[ \int \frac {A+B \log \left (\frac {e (a+b x)}{c+d x}\right )}{(f+g x)^4} \, dx=\frac {1}{6} \, {\left (\frac {2 \, b^{3} \log \left (b x + a\right )}{b^{3} f^{3} g - 3 \, a b^{2} f^{2} g^{2} + 3 \, a^{2} b f g^{3} - a^{3} g^{4}} - \frac {2 \, d^{3} \log \left (d x + c\right )}{d^{3} f^{3} g - 3 \, c d^{2} f^{2} g^{2} + 3 \, c^{2} d f g^{3} - c^{3} g^{4}} + \frac {2 \, {\left (3 \, {\left (b^{3} c d^{2} - a b^{2} d^{3}\right )} f^{2} - 3 \, {\left (b^{3} c^{2} d - a^{2} b d^{3}\right )} f g + {\left (b^{3} c^{3} - a^{3} d^{3}\right )} g^{2}\right )} \log \left (g x + f\right )}{b^{3} d^{3} f^{6} + a^{3} c^{3} g^{6} - 3 \, {\left (b^{3} c d^{2} + a b^{2} d^{3}\right )} f^{5} g + 3 \, {\left (b^{3} c^{2} d + 3 \, a b^{2} c d^{2} + a^{2} b d^{3}\right )} f^{4} g^{2} - {\left (b^{3} c^{3} + 9 \, a b^{2} c^{2} d + 9 \, a^{2} b c d^{2} + a^{3} d^{3}\right )} f^{3} g^{3} + 3 \, {\left (a b^{2} c^{3} + 3 \, a^{2} b c^{2} d + a^{3} c d^{2}\right )} f^{2} g^{4} - 3 \, {\left (a^{2} b c^{3} + a^{3} c^{2} d\right )} f g^{5}} - \frac {5 \, {\left (b^{2} c d - a b d^{2}\right )} f^{2} - 3 \, {\left (b^{2} c^{2} - a^{2} d^{2}\right )} f g + {\left (a b c^{2} - a^{2} c d\right )} g^{2} + 2 \, {\left (2 \, {\left (b^{2} c d - a b d^{2}\right )} f g - {\left (b^{2} c^{2} - a^{2} d^{2}\right )} g^{2}\right )} x}{b^{2} d^{2} f^{6} + a^{2} c^{2} f^{2} g^{4} - 2 \, {\left (b^{2} c d + a b d^{2}\right )} f^{5} g + {\left (b^{2} c^{2} + 4 \, a b c d + a^{2} d^{2}\right )} f^{4} g^{2} - 2 \, {\left (a b c^{2} + a^{2} c d\right )} f^{3} g^{3} + {\left (b^{2} d^{2} f^{4} g^{2} + a^{2} c^{2} g^{6} - 2 \, {\left (b^{2} c d + a b d^{2}\right )} f^{3} g^{3} + {\left (b^{2} c^{2} + 4 \, a b c d + a^{2} d^{2}\right )} f^{2} g^{4} - 2 \, {\left (a b c^{2} + a^{2} c d\right )} f g^{5}\right )} x^{2} + 2 \, {\left (b^{2} d^{2} f^{5} g + a^{2} c^{2} f g^{5} - 2 \, {\left (b^{2} c d + a b d^{2}\right )} f^{4} g^{2} + {\left (b^{2} c^{2} + 4 \, a b c d + a^{2} d^{2}\right )} f^{3} g^{3} - 2 \, {\left (a b c^{2} + a^{2} c d\right )} f^{2} g^{4}\right )} x} - \frac {2 \, \log \left (\frac {b e x}{d x + c} + \frac {a e}{d x + c}\right )}{g^{4} x^{3} + 3 \, f g^{3} x^{2} + 3 \, f^{2} g^{2} x + f^{3} g}\right )} B - \frac {A}{3 \, {\left (g^{4} x^{3} + 3 \, f g^{3} x^{2} + 3 \, f^{2} g^{2} x + f^{3} g\right )}} \]

[In]

integrate((A+B*log(e*(b*x+a)/(d*x+c)))/(g*x+f)^4,x, algorithm="maxima")

[Out]

1/6*(2*b^3*log(b*x + a)/(b^3*f^3*g - 3*a*b^2*f^2*g^2 + 3*a^2*b*f*g^3 - a^3*g^4) - 2*d^3*log(d*x + c)/(d^3*f^3*
g - 3*c*d^2*f^2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+ 3*f^2*g^2*x + f^3*g)

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 9339 vs. \(2 (263) = 526\).

Time = 0.78 (sec) , antiderivative size = 9339, normalized size of antiderivative = 33.96 \[ \int \frac {A+B \log \left (\frac {e (a+b x)}{c+d x}\right )}{(f+g x)^4} \, dx=\text {Too large to display} \]

[In]

integrate((A+B*log(e*(b*x+a)/(d*x+c)))/(g*x+f)^4,x, algorithm="giac")

[Out]

1/6*(2*(3*B*b^4*c^2*d^2*e*f^2 - 6*B*a*b^3*c*d^3*e*f^2 + 3*B*a^2*b^2*d^4*e*f^2 - 3*B*b^4*c^3*d*e*f*g + 3*B*a*b^
3*c^2*d^2*e*f*g + 3*B*a^2*b^2*c*d^3*e*f*g - 3*B*a^3*b*d^4*e*f*g + B*b^4*c^4*e*g^2 - B*a*b^3*c^3*d*e*g^2 - B*a^
3*b*c*d^3*e*g^2 + B*a^4*d^4*e*g^2)*log(-b*e*f + a*e*g + (b*e*x + a*e)*d*f/(d*x + c) - (b*e*x + a*e)*c*g/(d*x +
 c))/(b^3*d^3*f^6 - 3*b^3*c*d^2*f^5*g - 3*a*b^2*d^3*f^5*g + 3*b^3*c^2*d*f^4*g^2 + 9*a*b^2*c*d^2*f^4*g^2 + 3*a^
2*b*d^3*f^4*g^2 - b^3*c^3*f^3*g^3 - 9*a*b^2*c^2*d*f^3*g^3 - 9*a^2*b*c*d^2*f^3*g^3 - a^3*d^3*f^3*g^3 + 3*a*b^2*
c^3*f^2*g^4 + 9*a^2*b*c^2*d*f^2*g^4 + 3*a^3*c*d^2*f^2*g^4 - 3*a^2*b*c^3*f*g^5 - 3*a^3*c^2*d*f*g^5 + a^3*c^3*g^
6) + 2*(3*B*b^4*c^2*d^2*e^4*f^2 - 6*B*a*b^3*c*d^3*e^4*f^2 + 3*B*a^2*b^2*d^4*e^4*f^2 - 3*B*b^4*c^3*d*e^4*f*g +
3*B*a*b^3*c^2*d^2*e^4*f*g + 3*B*a^2*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^5/(d*x + c) + 12*(b*e*x + a*e)*a^2*c^3*d*e^2*f*g^5/(d*x + c) - 3
*(b*e*x + a*e)*a^2*c^4*e^2*g^6/(d*x + c) + 3*(b*e*x + a*e)^2*b*d^5*e*f^6/(d*x + c)^2 - 15*(b*e*x + a*e)^2*b*c*
d^4*e*f^5*g/(d*x + c)^2 - 3*(b*e*x + a*e)^2*a*d^5*e*f^5*g/(d*x + c)^2 + 30*(b*e*x + a*e)^2*b*c^2*d^3*e*f^4*g^2
/(d*x + c)^2 + 15*(b*e*x + a*e)^2*a*c*d^4*e*f^4*g^2/(d*x + c)^2 - 30*(b*e*x + a*e)^2*b*c^3*d^2*e*f^3*g^3/(d*x
+ c)^2 - 30*(b*e*x + a*e)^2*a*c^2*d^3*e*f^3*g^3/(d*x + c)^2 + 15*(b*e*x + a*e)^2*b*c^4*d*e*f^2*g^4/(d*x + c)^2
 + 30*(b*e*x + a*e)^2*a*c^3*d^2*e*f^2*g^4/(d*x + c)^2 - 3*(b*e*x + a*e)^2*b*c^5*e*f*g^5/(d*x + c)^2 - 15*(b*e*
x + a*e)^2*a*c^4*d*e*f*g^5/(d*x + c)^2 + 3*(b*e*x + a*e)^2*a*c^5*e*g^6/(d*x + c)^2 - (b*e*x + a*e)^3*d^6*f^6/(
d*x + c)^3 + 6*(b*e*x + a*e)^3*c*d^5*f^5*g/(d*x + c)^3 - 15*(b*e*x + a*e)^3*c^2*d^4*f^4*g^2/(d*x + c)^3 + 20*(
b*e*x + a*e)^3*c^3*d^3*f^3*g^3/(d*x + c)^3 - 15*(b*e*x + a*e)^3*c^4*d^2*f^2*g^4/(d*x + c)^3 + 6*(b*e*x + a*e)^
3*c^5*d*f*g^5/(d*x + c)^3 - (b*e*x + a*e)^3*c^6*g^6/(d*x + c)^3) - 2*(3*B*b^4*c^2*d^2*e*f^2 - 6*B*a*b^3*c*d^3*
e*f^2 + 3*B*a^2*b^2*d^4*e*f^2 - 3*B*b^4*c^3*d*e*f*g + 3*B*a*b^3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*e^3*f^
3*g/(d*x + c) + 12*(b*e*x + a*e)*B*a^3*b^2*d^5*e^3*f^3*g/(d*x + c) - 6*(b*e*x + a*e)*A*b^5*c^4*d*e^3*f^2*g^2/(
d*x + c) + 17*(b*e*x + a*e)*B*b^5*c^4*d*e^3*f^2*g^2/(d*x + c) - 30*(b*e*x + a*e)*A*a*b^4*c^3*d^2*e^3*f^2*g^2/(
d*x + c) - 32*(b*e*x + a*e)*B*a*b^4*c^3*d^2*e^3*f^2*g^2/(d*x + c) + 54*(b*e*x + a*e)*A*a^2*b^3*c^2*d^3*e^3*f^2
*g^2/(d*x + c) - 6*(b*e*x + a*e)*B*a^2*b^3*c^2*d^3*e^3*f^2*g^2/(d*x + c) + 6*(b*e*x + a*e)*A*a^3*b^2*c*d^4*e^3
*f^2*g^2/(d*x + c) + 40*(b*e*x + a*e)*B*a^3*b^2*c*d^4*e^3*f^2*g^2/(d*x + c) - 24*(b*e*x + a*e)*A*a^4*b*d^5*e^3
*f^2*g^2/(d*x + c) - 19*(b*e*x + a*e)*B*a^4*b*d^5*e^3*f^2*g^2/(d*x + c) - 5*(b*e*x + a*e)*B*b^5*c^5*e^3*f*g^3/
(d*x + c) + 12*(b*e*x + a*e)*A*a*b^4*c^4*d*e^3*f*g^3/(d*x + c) - 9*(b*e*x + a*e)*B*a*b^4*c^4*d*e^3*f*g^3/(d*x
+ c) + 6*(b*e*x + a*e)*A*a^2*b^3*c^3*d^2*e^3*f*g^3/(d*x + c) + 50*(b*e*x + a*e)*B*a^2*b^3*c^3*d^2*e^3*f*g^3/(d
*x + c) - 42*(b*e*x + a*e)*A*a^3*b^2*c^2*d^3*e^3*f*g^3/(d*x + c) - 46*(b*e*x + a*e)*B*a^3*b^2*c^2*d^3*e^3*f*g^
3/(d*x + c) + 18*(b*e*x + a*e)*A*a^4*b*c*d^4*e^3*f*g^3/(d*x + c) + 3*(b*e*x + a*e)*B*a^4*b*c*d^4*e^3*f*g^3/(d*
x + c) + 6*(b*e*x + a*e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- 5*a^4*b*c^3*e^3*f*g^7 - 3*a^5*c^2*d*e^3*f*g^7 + a^5*c^3*e^3*g^8 - 3*(b*e*x + a*e)*b^4*d^4*e^2*f^8/(d
*x + c) + 12*(b*e*x + a*e)*b^4*c*d^3*e^2*f^7*g/(d*x + c) + 12*(b*e*x + a*e)*a*b^3*d^4*e^2*f^7*g/(d*x + c) - 18
*(b*e*x + a*e)*b^4*c^2*d^2*e^2*f^6*g^2/(d*x + c) - 48*(b*e*x + a*e)*a*b^3*c*d^3*e^2*f^6*g^2/(d*x + c) - 18*(b*
e*x + a*e)*a^2*b^2*d^4*e^2*f^6*g^2/(d*x + c) + 12*(b*e*x + a*e)*b^4*c^3*d*e^2*f^5*g^3/(d*x + c) + 72*(b*e*x +
a*e)*a*b^3*c^2*d^2*e^2*f^5*g^3/(d*x + c) + 72*(b*e*x + a*e)*a^2*b^2*c*d^3*e^2*f^5*g^3/(d*x + c) + 12*(b*e*x +
a*e)*a^3*b*d^4*e^2*f^5*g^3/(d*x + c) - 3*(b*e*x + a*e)*b^4*c^4*e^2*f^4*g^4/(d*x + c) - 48*(b*e*x + a*e)*a*b^3*
c^3*d*e^2*f^4*g^4/(d*x + c) - 108*(b*e*x + a*e)*a^2*b^2*c^2*d^2*e^2*f^4*g^4/(d*x + c) - 48*(b*e*x + a*e)*a^3*b
*c*d^3*e^2*f^4*g^4/(d*x + c) - 3*(b*e*x + a*e)*a^4*d^4*e^2*f^4*g^4/(d*x + c) + 12*(b*e*x + a*e)*a*b^3*c^4*e^2*
f^3*g^5/(d*x + c) + 72*(b*e*x + a*e)*a^2*b^2*c^3*d*e^2*f^3*g^5/(d*x + c) + 72*(b*e*x + a*e)*a^3*b*c^2*d^2*e^2*
f^3*g^5/(d*x + c) + 12*(b*e*x + a*e)*a^4*c*d^3*e^2*f^3*g^5/(d*x + c) - 18*(b*e*x + a*e)*a^2*b^2*c^4*e^2*f^2*g^
6/(d*x + c) - 48*(b*e*x + a*e)*a^3*b*c^3*d*e^2*f^2*g^6/(d*x + c) - 18*(b*e*x + a*e)*a^4*c^2*d^2*e^2*f^2*g^6/(d
*x + c) + 12*(b*e*x + a*e)*a^3*b*c^4*e^2*f*g^7/(d*x + c) + 12*(b*e*x + a*e)*a^4*c^3*d*e^2*f*g^7/(d*x + c) - 3*
(b*e*x + a*e)*a^4*c^4*e^2*g^8/(d*x + c) + 3*(b*e*x + a*e)^2*b^3*d^5*e*f^8/(d*x + c)^2 - 15*(b*e*x + a*e)^2*b^3
*c*d^4*e*f^7*g/(d*x + c)^2 - 9*(b*e*x + a*e)^2*a*b^2*d^5*e*f^7*g/(d*x + c)^2 + 30*(b*e*x + a*e)^2*b^3*c^2*d^3*
e*f^6*g^2/(d*x + c)^2 + 45*(b*e*x + a*e)^2*a*b^2*c*d^4*e*f^6*g^2/(d*x + c)^2 + 9*(b*e*x + a*e)^2*a^2*b*d^5*e*f
^6*g^2/(d*x + c)^2 - 30*(b*e*x + a*e)^2*b^3*c^3*d^2*e*f^5*g^3/(d*x + c)^2 - 90*(b*e*x + a*e)^2*a*b^2*c^2*d^3*e
*f^5*g^3/(d*x + c)^2 - 45*(b*e*x + a*e)^2*a^2*b*c*d^4*e*f^5*g^3/(d*x + c)^2 - 3*(b*e*x + a*e)^2*a^3*d^5*e*f^5*
g^3/(d*x + c)^2 + 15*(b*e*x + a*e)^2*b^3*c^4*d*e*f^4*g^4/(d*x + c)^2 + 90*(b*e*x + a*e)^2*a*b^2*c^3*d^2*e*f^4*
g^4/(d*x + c)^2 + 90*(b*e*x + a*e)^2*a^2*b*c^2*d^3*e*f^4*g^4/(d*x + c)^2 + 15*(b*e*x + a*e)^2*a^3*c*d^4*e*f^4*
g^4/(d*x + c)^2 - 3*(b*e*x + a*e)^2*b^3*c^5*e*f^3*g^5/(d*x + c)^2 - 45*(b*e*x + a*e)^2*a*b^2*c^4*d*e*f^3*g^5/(
d*x + c)^2 - 90*(b*e*x + a*e)^2*a^2*b*c^3*d^2*e*f^3*g^5/(d*x + c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d*x + c)^3 - (b*e*x + a*e)^3*b^2
*c^6*f^2*g^6/(d*x + c)^3 - 12*(b*e*x + a*e)^3*a*b*c^5*d*f^2*g^6/(d*x + c)^3 - 15*(b*e*x + a*e)^3*a^2*c^4*d^2*f
^2*g^6/(d*x + c)^3 + 2*(b*e*x + a*e)^3*a*b*c^6*f*g^7/(d*x + c)^3 + 6*(b*e*x + a*e)^3*a^2*c^5*d*f*g^7/(d*x + c)
^3 - (b*e*x + a*e)^3*a^2*c^6*g^8/(d*x + c)^3))*(b*c/((b*c*e - a*d*e)*(b*c - a*d)) - a*d/((b*c*e - a*d*e)*(b*c
- a*d)))

Mupad [B] (verification not implemented)

Time = 7.32 (sec) , antiderivative size = 1154, normalized size of antiderivative = 4.20 \[ \int \frac {A+B \log \left (\frac {e (a+b x)}{c+d x}\right )}{(f+g x)^4} \, dx=\frac {\ln \left (f+g\,x\right )\,\left (g\,\left (3\,B\,a^2\,b\,d^3\,f-3\,B\,b^3\,c^2\,d\,f\right )-g^2\,\left (B\,a^3\,d^3-B\,b^3\,c^3\right )-3\,B\,a\,b^2\,d^3\,f^2+3\,B\,b^3\,c\,d^2\,f^2\right )}{3\,a^3\,c^3\,g^6-9\,a^3\,c^2\,d\,f\,g^5+9\,a^3\,c\,d^2\,f^2\,g^4-3\,a^3\,d^3\,f^3\,g^3-9\,a^2\,b\,c^3\,f\,g^5+27\,a^2\,b\,c^2\,d\,f^2\,g^4-27\,a^2\,b\,c\,d^2\,f^3\,g^3+9\,a^2\,b\,d^3\,f^4\,g^2+9\,a\,b^2\,c^3\,f^2\,g^4-27\,a\,b^2\,c^2\,d\,f^3\,g^3+27\,a\,b^2\,c\,d^2\,f^4\,g^2-9\,a\,b^2\,d^3\,f^5\,g-3\,b^3\,c^3\,f^3\,g^3+9\,b^3\,c^2\,d\,f^4\,g^2-9\,b^3\,c\,d^2\,f^5\,g+3\,b^3\,d^3\,f^6}-\frac {\frac {2\,A\,a^2\,c^2\,g^4+2\,A\,b^2\,d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f^2\,g^2-2\,a\,b\,d^2\,f^3\,g+b^2\,c^2\,f^2\,g^2-2\,b^2\,c\,d\,f^3\,g+b^2\,d^2\,f^4\right )}}{3\,f^3\,g+9\,f^2\,g^2\,x+9\,f\,g^3\,x^2+3\,g^4\,x^3}-\frac {B\,b^3\,\ln \left (a+b\,x\right )}{3\,a^3\,g^4-9\,a^2\,b\,f\,g^3+9\,a\,b^2\,f^2\,g^2-3\,b^3\,f^3\,g}+\frac {B\,d^3\,\ln \left (c+d\,x\right )}{3\,c^3\,g^4-9\,c^2\,d\,f\,g^3+9\,c\,d^2\,f^2\,g^2-3\,d^3\,f^3\,g}-\frac {B\,\ln \left (\frac {e\,\left (a+b\,x\right )}{c+d\,x}\right )}{3\,g\,\left (f^3+3\,f^2\,g\,x+3\,f\,g^2\,x^2+g^3\,x^3\right )} \]

[In]

int((A + B*log((e*(a + b*x))/(c + d*x)))/(f + g*x)^4,x)

[Out]

(log(f + g*x)*(g*(3*B*a^2*b*d^3*f - 3*B*b^3*c^2*d*f) - g^2*(B*a^3*d^3 - B*b^3*c^3) - 3*B*a*b^2*d^3*f^2 + 3*B*b
^3*c*d^2*f^2))/(3*a^3*c^3*g^6 + 3*b^3*d^3*f^6 - 3*a^3*d^3*f^3*g^3 - 3*b^3*c^3*f^3*g^3 - 9*a^2*b*c^3*f*g^5 - 9*
a*b^2*d^3*f^5*g - 9*a^3*c^2*d*f*g^5 - 9*b^3*c*d^2*f^5*g + 9*a*b^2*c^3*f^2*g^4 + 9*a^2*b*d^3*f^4*g^2 + 9*a^3*c*
d^2*f^2*g^4 + 9*b^3*c^2*d*f^4*g^2 + 27*a*b^2*c*d^2*f^4*g^2 - 27*a*b^2*c^2*d*f^3*g^3 - 27*a^2*b*c*d^2*f^3*g^3 +
 27*a^2*b*c^2*d*f^2*g^4) - ((2*A*a^2*c^2*g^4 + 2*A*b^2*d^2*f^4 + 2*A*a^2*d^2*f^2*g^2 + 2*A*b^2*c^2*f^2*g^2 + 3
*B*a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